<%-- 
    Document   : teamProgress
    Created on : 7.5.2011, 11:52:58
    Author     : Football-Statistics Team
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<f:setLocale value="${pageContext.request.locale}"/>
<f:setBundle basename="labelsBundle" />

<!DOCTYPE html>
<html>
    <head>
        <title><f:message key="project_title" /></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="../css/main.css" media="screen" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
        <script type="text/javascript" src="../js/superfish.js"></script>
        <script type="text/javascript" src="../js/hoverIntent.js"></script>
        <c:if test="${not empty xml_team_progress and not empty team}">
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript">
            <f:message key="round" var="round"/>
            <f:message key="position" var="position"/>
            <f:message key="team_progress" var="team_progress"/>    
            <c:import url="XSLT/teamProgressChart.xsl" var="xslt"/>
            <x:transform xml="${xml_team_progress}" xslt="${xslt}">
                <x:param name="loc_round" value="${round}"/>
                <x:param name="loc_position" value="${position}"/>
                <x:param name="loc_team_progress" value="${team_progress}"/>
                <x:param name="team" value="${team}"/>
            </x:transform>
        </script>
        </c:if>
    </head>
    <body>
        <div class="c">
            <header>
                <a id="logo" href="${pageContext.request.contextPath}/"></a>            
            </header>
            <nav>
                <c:if test="${not empty xml_menu}">
                    <jsp:include page="menu.jsp">
                        <jsp:param name="section" value="statistics"/>
                    </jsp:include>
                </c:if>
            </nav>
            <section>
                <c:if test="${not empty error}">
                    <div style="border: solid 1px red; background-color: yellow; padding: 10px">
                        <c:out value="${error}"/>
                    </div>
                </c:if>
                <c:if test="${not empty lid}">
                    <h1><f:message key="statistics" /></h1>
                    <jsp:include page="statisticsNavigation.jsp"/>
                    <h2><f:message key="team_progress" /></h2>
                </c:if>
                <c:if test="${not empty xml_teams}">
                    <c:import url="XSLT/teamSelect.xsl" var="xslt"/>
                    <f:message key="select_team" var="select_team"/>
                    <x:transform xml="${xml_teams}" xslt="${xslt}">
                        <x:param name="select_team" value="${select_team}"/>
                        <x:param name="team" value="${team}"/>
                        <x:param name="redirect" value="${pageContext.request.contextPath}/statistics/team-progress?lid=${lid}&team="/>
                    </x:transform>
                    <div id="chart_div"></div>
                </c:if>
            </section>
        </div>
    </body>
</html>
